package my.myspring.tool;

import org.springframework.context.ApplicationContext;
import org.springframework.beans.BeansException;

/**
 * Created by IntelliJ IDEA.
 * User: Administrator
 * Date: 2010-10-14
 * Time: 13:09:01
 * To change this template use File | Settings | File Templates.
 */
public class SpringUtil {
     public  static void setApplicationContext(ApplicationContext arg0) {
        SpringBeanProxy.setApplicationContext(arg0);
    }

    /**
     * @return applicationContext
     */
    public static ApplicationContext getApplicationContext() {
        return SpringBeanProxy.getApplicationContext();
    }

    public static Object getBean(String beanName) throws BeansException {
        return SpringBeanProxy.getBean(beanName);
	}

     public static <T> T getBean(String beanName,Class<T> t) throws BeansException {
        return SpringBeanProxy.getBean(beanName,t);
	}
}
